import request from "@/utils/request";
import cfg from "@/config/config";

// const workCalendar = {
//   //验证登录
//   valiLogin: param => {
//     return request("post", cfg.apiUrl + "api/login/valiLogin", param);
//   }
// };

// export default workCalendar;

const workCalendarApi = {
  // 获取工作日历列表
  findWorkCalendarList: param => {
    return request("post", cfg.apiUrl + "api/workCalendar/findWorkCalendarList", param);
  },
  // 查询所有班次
  findBanCiList: param => {
    return request("post", cfg.apiUrl + "api/workCalendar/findBanCiList",param);
  },
  // 左侧添加工作日历
  insertWorkCalendar: param => {
    return request("post", cfg.apiUrl + "api/workCalendar/insertWorkCalendar" , param);
  },
  // 左侧修改工作日历
  updateWorkCalendar: param => {
    return request("post", cfg.apiUrl + "api/workCalendar/updateWorkCalendar" , param);
  },
  // 左侧删除工作日历
  deleteWorkCalendar: param => {
    return request("post", cfg.apiUrl + "api/workCalendar/deleteWorkCalendar" , param);
  },
  // 获取右侧工作日历数据
  getBdKqWorkCalendarDetailList: param => {
    return request("post", cfg.apiUrl + "api/workCalendar/getBdKqWorkCalendarDetailList" , param);
  },
  // 右侧设置日历类型 dayType：类型(0休息日, 1工作日, 2节假日)
  updateSetDate: param => {
    return request("post", cfg.apiUrl + "api/workCalendar/updateSetDate" , param);
  }
};

export default workCalendarApi;